import service from '@/utils/request'
// @Tags CaseCause
// @Summary 创建案由管理
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.CaseCause true "创建案由管理"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /CC/createCaseCause [post]
export const createCaseCause = (data) => {
  return service({
    url: '/CC/createCaseCause',
    method: 'post',
    data
  })
}

// @Tags CaseCause
// @Summary 删除案由管理
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.CaseCause true "删除案由管理"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /CC/deleteCaseCause [delete]
export const deleteCaseCause = (params) => {
  return service({
    url: '/CC/deleteCaseCause',
    method: 'delete',
    params
  })
}

// @Tags CaseCause
// @Summary 批量删除案由管理
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除案由管理"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /CC/deleteCaseCause [delete]
export const deleteCaseCauseByIds = (params) => {
  return service({
    url: '/CC/deleteCaseCauseByIds',
    method: 'delete',
    params
  })
}

// @Tags CaseCause
// @Summary 更新案由管理
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.CaseCause true "更新案由管理"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /CC/updateCaseCause [put]
export const updateCaseCause = (data) => {
  return service({
    url: '/CC/updateCaseCause',
    method: 'put',
    data
  })
}

// @Tags CaseCause
// @Summary 用id查询案由管理
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.CaseCause true "用id查询案由管理"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /CC/findCaseCause [get]
export const findCaseCause = (params) => {
  return service({
    url: '/CC/findCaseCause',
    method: 'get',
    params
  })
}

// @Tags CaseCause
// @Summary 分页获取案由管理列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取案由管理列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /CC/getCaseCauseList [get]
export const getCaseCauseList = (params) => {
  return service({
    url: '/CC/getCaseCauseList',
    method: 'get',
    params
  })
}

// @Tags CaseCause
// @Summary 不需要鉴权的案由管理接口
// @Accept application/json
// @Produce application/json
// @Param data query flaudReq.CaseCauseSearch true "分页获取案由管理列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /CC/getCaseCausePublic [get]
export const getCaseCausePublic = () => {
  return service({
    url: '/CC/getCaseCausePublic',
    method: 'get',
  })
}
